import BaseMonsterSkill from "./BaseMonsterSkill";
import IBaseMonsterSkill from "./IBaseMonsterSkill";
 




export default class StopSkill extends BaseMonsterSkill implements IBaseMonsterSkill {





    exec() {
        // console.log("StopSkill exec")
        if (this._isSkilling === true) {
            if ((Laya.Browser.now() - this._preExecTime) > this._durationTime) {
                this._target.resume();
                this._isSkilling = false;
                this.resetTime();
            }
        }
        else {
            if (this.canExec()) {
                // console.log("STUNING...")
                this._isSkilling = true;
                this._target.stop();
                this._preExecTime = Laya.Browser.now();
            }
        }

    }


}